import T from 'utils/T';
import EnumAPI from 'constants/EnumAPI';

const { get, post, put, del, postJSON } = T.request;



/**
 * 获取用户列表
 */
export const getUserList = () => get(EnumAPI.getUser, {});

/**
 * 启用用户
 */
export const startUser = (user_id) => get(EnumAPI.startUser, { user_id });
/**
 * 禁用用户
 */
export const stopUser = (user_id) => get(EnumAPI.stopUser, { user_id });
/**
 * 删除用户
 */
export const delUser = (user_id) => get(EnumAPI.delUser, { user_id });

/**
 * 添加用户
 */
export const addUser = (user_name, user_phone, user_password, user_email, account_id) => postJSON(EnumAPI.addUser, { user_name, user_phone, user_password, user_email, account_id });
/**
 * 更新用户信息
 */
export const updateUser = (user_id, user_name, user_phone, user_email, account_id) => postJSON(EnumAPI.updateUser, {user_id, user_name, user_phone, user_email, account_id });
